#define _CRT_SECURE_NO_WARNINGS
#include<string>
#include<iostream>
#include<algorithm>
using namespace std;
string sub(string& a, string& b)
{
	char falg = '+';
	if (a.size() < b.size() ||(a.size()==b.size()&&a<b))//b>a
	{
		a.swap(b);
		falg = '-';
	}
	reverse(a.begin(), a.end());
	reverse(b.begin(), b.end());
	int az = a.size(); int bz = b.size();
	int count = 0;//¼λ
	string ret;
	for (int i = 0; i < az; i++)
	{
		int tem1 = a[i] - '0'-count;
		int tem2 = i < bz ? b[i] - '0' : 0;
		if (tem1 >= tem2)
		{
			ret.push_back(tem1 - tem2  + '0');
			count = 0;
		}
		else
		{
			ret.push_back(tem1 - tem2 + 10+'0');
			count = 1;
		}
	}
	while (ret.size() > 1 && ret[ret.size() - 1] == '0') ret.pop_back();
	if (falg == '-')
	{
		ret.push_back(falg);
	}
	reverse(ret.begin(), ret.end());
	return ret;
	
}
int main()
{
	string a, b; cin >> a >> b;
	cout << sub(a, b);
}
